﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using StructureMap.Configuration.DSL;
using StructureMap;

using ProjectBase.Core;
using ProjectBase.Core.Storage;

using Survey.Common.Data;
using Survey.Common.Data.Services;

namespace Survey.Tools.IoC
{
    [CLSCompliant(false)]
    public class DefaultProfileRegistry : Registry
    {
        public DefaultProfileRegistry()
        {
            Profile("DefaultProfile", x =>
            {
                x.For<ISessionStorageProvider>()
                    .Use(new ProxyInstance(typeof(DefaultSessionStorageProvider)))
                    //.Use(new ProxyInstance(typeof(ProfileSessionStorageProvider))) // when Profile enabled
                    ;

                x.For<ITranslatorDao>()
                    .Use(new ProxyInstance(typeof(Data.Services.Xml.TranslatorDao)));
                x.For<ILanguageDao>()
                    .Use(new ProxyInstance(typeof(Data.Services.Xml.LanguageDao)));

                x.For<IUserDao>()
                    .Use(new ProxyInstance(typeof(Data.Services.Xml.UserDao)));

                x.For<IArticleDao>()
                    .Use(new ProxyInstance(typeof(Data.Services.Xml.ArticleDao)));
                x.For<IArticleGroupDao>()
                    .Use(new ProxyInstance(typeof(Data.Xml.ArticleGroupDao)));
                x.For<IArticleCategoryDao>()
                    .Use(new ProxyInstance(typeof(Data.Xml.ArticleCategoryDao)));

                //x.For<ITranslatorDao>()
                //    .Use(new ProxyInstance(typeof(Data.Services.TranslatorDao)));
                //x.For<ILanguageDao>()
                //    .Use(new ProxyInstance(typeof(Data.Services.LanguageDao)));

                //x.For<IUserDao>()
                //    .Use(new ProxyInstance(typeof(Data.Services.UserDao)));

                //x.For<IArticleDao>()
                //    .Use(new ProxyInstance(typeof(Data.Services.ArticleDao)));
                //x.For<IArticleGroupDao>()
                //    .Use(new ProxyInstance(typeof(Data.ArticleGroupDao)));
                //x.For<IArticleCategoryDao>()
                //    .Use(new ProxyInstance(typeof(Data.ArticleCategoryDao)));
            });
        }
    }
}
